package cn.tedu.ezhaung_project.controller;

import cn.tedu.ezhaung_project.mapper.EffectPicMapper;
import cn.tedu.ezhaung_project.pojo.vo.EffectPicSelectVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/effectPic")
public class EffectPicController {
    @Autowired(required = false)
    EffectPicMapper mapper;
    @RequestMapping("/selectByPinyin")
    public List<EffectPicSelectVO>effectPicTur(String pinyin){
        if(mapper.isFather(pinyin)==1){
            return mapper.effectPicTur(pinyin);
        }
       return mapper.effectPicTurSon(pinyin);
    }
    @RequestMapping("/select")
    public List<EffectPicSelectVO>effectPicSelect(){
        System.out.println(mapper.effectPicSelect()+"!!!!!!!!!!!!!!!!");
       return mapper.effectPicSelect();
    }


}